package com.woniuxy.microcurrentserver.util;

import com.woniuxy.microcurrentserver.service.CurrentFundAllService;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author ：陈酒
 * @date ：Created in 2021/4/12 17:55
 * @description：定时任务
 * @modified By：
 * @version: 1.0$
 */

@Component
//    @RestController
//    @RequestMapping("task")
public class MyTask {

    @Resource
    private CurrentFundAllService currentFundAllService;

    /**
     * 定时任务
     */
    @Scheduled(cron="0 0 16 ? * *")
//    @GetMapping("test")
    public void handler02(){

        boolean b = this.currentFundAllService.updateAll();

    }





}
